Skip to content

Conversation

@bastiankistner
Copy link
Contributor

@bastiankistner bastiankistner commented Jul 20, 2025

Use devDependencies for types and optionally peerDependencies Otherwise, this will mess up any app or library that uses cloudflare's auto-generated workers types

Cloudflare allows generating types with wrangler types. If we have @cloudflare/workers-types in our dependencies this will conflict with the Env declaration. Therefore this package must be used as a peerDependency and can still be used for development as a devDependency. This avoids the conflict when using this package.

I published a temporary package as logtail-edge-cf on npm that I will be using until this PR is merged.

Use devDependencies for types and optionally peerDependencies
Otherwise, this will mess up any app or library that uses cloudflare's auto-generated workers types
@PetrHeinz
Copy link
Member

Hi @bastiankistner, thanks for bringing this to our attention 🙌

Moving the package to peer dependencies makes sense to me, and seems like a good approach to ensuring compatibility.

I'm hoping to merge the peer dependency update and release a new version of our package as soon as possible 🙏

@PetrHeinz PetrHeinz merged commit eb7df50 into logtail:master Nov 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants